<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'dept.jsp' starting page</title>

<link rel="stylesheet" type="text/css" href="<%=basePath%>css/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/themes/icon.css">
<link rel="stylesheet" href="<%=basePath%>css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.ztree.all.min.js"></script>
<script type="text/javascript" src="<%=basePath%>rbac/dept/js/dept.js"></script>
</head>

<body class="easyui-layout" id="cc">
	<div data-options="region:'west'" id="ztreePanel" style="width:250px;padding:10px;overflow:hidden;">
		<ul id="tree" class="ztree"></ul>
	</div>
	<div id="mm" class="easyui-menu" style="width:120px;">
		<div data-options="name:'addDept',iconCls:'icon-add'" id="addDept">添加部门</div>
		<div data-options="name:'updateDept',iconCls:'icon-edit'" id="updateDept">修改部门</div>
		<div data-options="name:'delDept',iconCls:'icon-cancel'" id="delDept">删除部门</div>
	</div>
	<div id="dialog" class="easyui-window" closed="true">
		<table>
			<tbody id="folderAction">
				<tr>
					<td>部门名称:</td>
					<td><input type="text" id="deptName" /></td>
				</tr>
				<tr>
					<td>排序:</td>
					<td><input id="deptSort"> </td>
				</tr>
			</tbody>
		</table>
	</div>
	<div data-options="region:'center'">
		<table id="deptDatagrid"></table>
	</div>
	<div id="deptDatagridMenus">
		<a href="javascript:void(0);" id="DataAdd" class="easyui-linkbutton" icon="icon-add" plain="true" onclick="openpersonnelDialog('添加');">添加用户</a>
		<a href="javascript:void(0);" id="DataAdd" class="easyui-linkbutton" icon="icon-edit" plain="true" onclick="getUsers();">修改</a>
		<a href="javascript:void(0);" id="DataAdd" class="easyui-linkbutton" icon="icon-remove" plain="true" onclick="delUsers();">删除</a>
	</div>

	<div id="dialog" class="easyui-window" closed="true">
		<form id="deptForm">
			<table>
				<tbody>
					<tr>
						<td>岗位名称:</td>
						<td><input type="text" id="roleid" style="display:none;" /> <input type="text" id="rolename" /></td>
					</tr>
					<tr>
						<td>别称:</td>
						<td><input type="text" id="nickname" /></td>
					</tr>
				</tbody>
			</table>
		</form>
	</div>
	
	<div id="personnelDialog" class="easyui-window" closed="true">
		<form id="personnelForm">
			<table>
				<tbody>
					<tr>
						<td>姓名:</td>
						<td><input type="text" id="userid" style="display:none;" />
					<input type="text" id="username" class="easyui-validatebox" required="true" validType="remote['/rbac/checkUsername','yonghuming']" invalidMessage="用户名已存在" delay="1000"/></td> 
					<!-- <input type="text" id="username" class="easyui-validatebox" data-options="required:true"  validType="equalTo['yonghuming']" /></td>  -->
					</tr>
					<tr>
						<td>密码:</td>
						<td><input type="text" id="userpass" /></td>
					</tr>
					<tr>
						<td>岗位:</td>
						<td><input  class="easyui-combobox" id="role"/></td>
					</tr>
					<tr>
						<td>状态:</td>
						<td><input class="easyui-combobox" id="userstate" /></td>
					</tr>
					<!-- 					<tr>
						<td>电话号码:</td>
						<td><input type="text" id="cell" /></td>
					</tr>
										<tr>
						<td>邮箱:</td>
						<td><input type="text" id="email" /></td>
					</tr>
						<tr>
						<td align="right" style="font-size: 16px">所在区县:</td>
						<td colspan="3">
							<select style="width:98%" id="qxdm"   class="easyui-validatebox" data-options="required:true">
							</select>
						</td>
					</tr>
										<tr>
						<td>备注:</td>
						<td><input type="textarea" id="remark"  rows="3" cols="20"/> 
						<textarea rows="3" cols="15"></textarea>
						
						</td>
					</tr> -->
				</tbody>
			</table>
		</form>
	</div>
</body>
</html>
